#ifndef __CRC16_H
#define __CRC16_H

#define	MULT_CRC16			0x8005
#define	MULT_CRC16CCITT		0x1021

/*     CRC16 CCITT 算法，生成多项式 = 0x1021              */
unsigned short Get_CRC16_CCITT(unsigned long nLength,unsigned char *pData);

/*     CRC16 算法，生成多项式 = 0x8005                    */
unsigned short Get_CRC16(unsigned long nLength,unsigned char *pData);
void mK_cRctable(unsigned short gEnpoly,unsigned short *cRctable_16);
int DectoBCD(int Dec, unsigned char *Bcd);
#endif

